﻿
namespace Caffeine.Core.Test.TestModel.ModelExtensionTesterModels
{
    public class TestModelA : ModelBase
    {
        #region ChildModel Property (INPC Only)

        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        [Caffeine.Core.ModelBackingProperty(typeof(TestModelA), "ChildModelProperty", false, true)]
        protected readonly Caffeine.Core.ModelProperty<TestModelA> _ChildModelProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the ChildModel backing property
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public virtual Caffeine.Core.ModelProperty<TestModelA> ChildModelProperty
        {
            get { return _ChildModelProperty; }
        }

        /// <summary>
        /// Gets or sets the ChildModelProperty.Value value. This property supports change notification. If the ChildModelProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [ChildModelProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public virtual TestModelA ChildModel
        {
            get { return ChildModelProperty.Value; }
            set { ChildModelProperty.Value = value; }
        }

        #endregion
    }
}
